// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by sidekick. DO NOT EDIT.
#![allow(rustdoc::redundant_explicit_links)]
#![allow(rustdoc::broken_intra_doc_links)]

/// Implements a client for the Cloud Dataproc API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_dataproc_v1::client::AutoscalingPolicyService;
/// let client = AutoscalingPolicyService::builder().build().await?;
/// // use `client` to make requests to the Cloud Dataproc API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// The API interface for managing autoscaling policies in the
/// Dataproc API.
///
/// # Configuration
///
/// To configure `AutoscalingPolicyService` use the `with_*` methods in the type returned
/// by [builder()][AutoscalingPolicyService::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://dataproc.googleapis.com`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::autoscaling_policy_service::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::autoscaling_policy_service::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `AutoscalingPolicyService` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `AutoscalingPolicyService` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct AutoscalingPolicyService {
    inner: std::sync::Arc<dyn super::stub::dynamic::AutoscalingPolicyService>,
}

impl AutoscalingPolicyService {
    /// Returns a builder for [AutoscalingPolicyService].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_dataproc_v1::client::AutoscalingPolicyService;
    /// let client = AutoscalingPolicyService::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::autoscaling_policy_service::ClientBuilder {
        gax::client_builder::internal::new_builder(
            super::builder::autoscaling_policy_service::client::Factory,
        )
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::AutoscalingPolicyService + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<
        std::sync::Arc<dyn super::stub::dynamic::AutoscalingPolicyService>,
    > {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::AutoscalingPolicyService> {
        super::transport::AutoscalingPolicyService::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::AutoscalingPolicyService> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::AutoscalingPolicyService::new)
    }

    /// Creates new autoscaling policy.
    pub fn create_autoscaling_policy(
        &self,
    ) -> super::builder::autoscaling_policy_service::CreateAutoscalingPolicy {
        super::builder::autoscaling_policy_service::CreateAutoscalingPolicy::new(self.inner.clone())
    }

    /// Updates (replaces) autoscaling policy.
    ///
    /// Disabled check for update_mask, because all updates will be full
    /// replacements.
    pub fn update_autoscaling_policy(
        &self,
    ) -> super::builder::autoscaling_policy_service::UpdateAutoscalingPolicy {
        super::builder::autoscaling_policy_service::UpdateAutoscalingPolicy::new(self.inner.clone())
    }

    /// Retrieves autoscaling policy.
    pub fn get_autoscaling_policy(
        &self,
    ) -> super::builder::autoscaling_policy_service::GetAutoscalingPolicy {
        super::builder::autoscaling_policy_service::GetAutoscalingPolicy::new(self.inner.clone())
    }

    /// Lists autoscaling policies in the project.
    pub fn list_autoscaling_policies(
        &self,
    ) -> super::builder::autoscaling_policy_service::ListAutoscalingPolicies {
        super::builder::autoscaling_policy_service::ListAutoscalingPolicies::new(self.inner.clone())
    }

    /// Deletes an autoscaling policy. It is an error to delete an autoscaling
    /// policy that is in use by one or more clusters.
    pub fn delete_autoscaling_policy(
        &self,
    ) -> super::builder::autoscaling_policy_service::DeleteAutoscalingPolicy {
        super::builder::autoscaling_policy_service::DeleteAutoscalingPolicy::new(self.inner.clone())
    }

    /// Sets the access control policy on the specified resource. Replaces
    /// any existing policy.
    ///
    /// Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
    /// errors.
    pub fn set_iam_policy(&self) -> super::builder::autoscaling_policy_service::SetIamPolicy {
        super::builder::autoscaling_policy_service::SetIamPolicy::new(self.inner.clone())
    }

    /// Gets the access control policy for a resource. Returns an empty policy
    /// if the resource exists and does not have a policy set.
    pub fn get_iam_policy(&self) -> super::builder::autoscaling_policy_service::GetIamPolicy {
        super::builder::autoscaling_policy_service::GetIamPolicy::new(self.inner.clone())
    }

    /// Returns permissions that a caller has on the specified resource. If the
    /// resource does not exist, this will return an empty set of
    /// permissions, not a `NOT_FOUND` error.
    ///
    /// Note: This operation is designed to be used for building
    /// permission-aware UIs and command-line tools, not for authorization
    /// checking. This operation may "fail open" without warning.
    pub fn test_iam_permissions(
        &self,
    ) -> super::builder::autoscaling_policy_service::TestIamPermissions {
        super::builder::autoscaling_policy_service::TestIamPermissions::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::autoscaling_policy_service::ListOperations {
        super::builder::autoscaling_policy_service::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::autoscaling_policy_service::GetOperation {
        super::builder::autoscaling_policy_service::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::autoscaling_policy_service::DeleteOperation {
        super::builder::autoscaling_policy_service::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::autoscaling_policy_service::CancelOperation {
        super::builder::autoscaling_policy_service::CancelOperation::new(self.inner.clone())
    }
}

/// Implements a client for the Cloud Dataproc API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_dataproc_v1::client::BatchController;
/// let client = BatchController::builder().build().await?;
/// // use `client` to make requests to the Cloud Dataproc API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// The BatchController provides methods to manage batch workloads.
///
/// # Configuration
///
/// To configure `BatchController` use the `with_*` methods in the type returned
/// by [builder()][BatchController::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://dataproc.googleapis.com`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::batch_controller::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::batch_controller::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `BatchController` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `BatchController` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct BatchController {
    inner: std::sync::Arc<dyn super::stub::dynamic::BatchController>,
}

impl BatchController {
    /// Returns a builder for [BatchController].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_dataproc_v1::client::BatchController;
    /// let client = BatchController::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::batch_controller::ClientBuilder {
        gax::client_builder::internal::new_builder(
            super::builder::batch_controller::client::Factory,
        )
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::BatchController + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::BatchController>>
    {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::BatchController> {
        super::transport::BatchController::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::BatchController> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::BatchController::new)
    }

    /// Creates a batch workload that executes asynchronously.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_batch(&self) -> super::builder::batch_controller::CreateBatch {
        super::builder::batch_controller::CreateBatch::new(self.inner.clone())
    }

    /// Gets the batch workload resource representation.
    pub fn get_batch(&self) -> super::builder::batch_controller::GetBatch {
        super::builder::batch_controller::GetBatch::new(self.inner.clone())
    }

    /// Lists batch workloads.
    pub fn list_batches(&self) -> super::builder::batch_controller::ListBatches {
        super::builder::batch_controller::ListBatches::new(self.inner.clone())
    }

    /// Deletes the batch workload resource. If the batch is not in terminal state,
    /// the delete fails and the response returns `FAILED_PRECONDITION`.
    pub fn delete_batch(&self) -> super::builder::batch_controller::DeleteBatch {
        super::builder::batch_controller::DeleteBatch::new(self.inner.clone())
    }

    /// Sets the access control policy on the specified resource. Replaces
    /// any existing policy.
    ///
    /// Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
    /// errors.
    pub fn set_iam_policy(&self) -> super::builder::batch_controller::SetIamPolicy {
        super::builder::batch_controller::SetIamPolicy::new(self.inner.clone())
    }

    /// Gets the access control policy for a resource. Returns an empty policy
    /// if the resource exists and does not have a policy set.
    pub fn get_iam_policy(&self) -> super::builder::batch_controller::GetIamPolicy {
        super::builder::batch_controller::GetIamPolicy::new(self.inner.clone())
    }

    /// Returns permissions that a caller has on the specified resource. If the
    /// resource does not exist, this will return an empty set of
    /// permissions, not a `NOT_FOUND` error.
    ///
    /// Note: This operation is designed to be used for building
    /// permission-aware UIs and command-line tools, not for authorization
    /// checking. This operation may "fail open" without warning.
    pub fn test_iam_permissions(&self) -> super::builder::batch_controller::TestIamPermissions {
        super::builder::batch_controller::TestIamPermissions::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::batch_controller::ListOperations {
        super::builder::batch_controller::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::batch_controller::GetOperation {
        super::builder::batch_controller::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::batch_controller::DeleteOperation {
        super::builder::batch_controller::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::batch_controller::CancelOperation {
        super::builder::batch_controller::CancelOperation::new(self.inner.clone())
    }
}

/// Implements a client for the Cloud Dataproc API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_dataproc_v1::client::ClusterController;
/// let client = ClusterController::builder().build().await?;
/// // use `client` to make requests to the Cloud Dataproc API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// The ClusterControllerService provides methods to manage clusters
/// of Compute Engine instances.
///
/// # Configuration
///
/// To configure `ClusterController` use the `with_*` methods in the type returned
/// by [builder()][ClusterController::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://dataproc.googleapis.com`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::cluster_controller::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::cluster_controller::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `ClusterController` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `ClusterController` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct ClusterController {
    inner: std::sync::Arc<dyn super::stub::dynamic::ClusterController>,
}

impl ClusterController {
    /// Returns a builder for [ClusterController].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_dataproc_v1::client::ClusterController;
    /// let client = ClusterController::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::cluster_controller::ClientBuilder {
        gax::client_builder::internal::new_builder(
            super::builder::cluster_controller::client::Factory,
        )
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::ClusterController + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::ClusterController>>
    {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::ClusterController> {
        super::transport::ClusterController::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::ClusterController> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::ClusterController::new)
    }

    /// Creates a cluster in a project. The returned
    /// [Operation.metadata][google.longrunning.Operation.metadata] will be
    /// [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
    ///
    /// [google.longrunning.Operation.metadata]: longrunning::model::Operation::metadata
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_cluster(&self) -> super::builder::cluster_controller::CreateCluster {
        super::builder::cluster_controller::CreateCluster::new(self.inner.clone())
    }

    /// Updates a cluster in a project. The returned
    /// [Operation.metadata][google.longrunning.Operation.metadata] will be
    /// [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
    /// The cluster must be in a
    /// [`RUNNING`][google.cloud.dataproc.v1.ClusterStatus.State] state or an error
    /// is returned.
    ///
    /// [google.cloud.dataproc.v1.ClusterStatus.State]: crate::model::cluster_status::State
    /// [google.longrunning.Operation.metadata]: longrunning::model::Operation::metadata
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_cluster(&self) -> super::builder::cluster_controller::UpdateCluster {
        super::builder::cluster_controller::UpdateCluster::new(self.inner.clone())
    }

    /// Stops a cluster in a project.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn stop_cluster(&self) -> super::builder::cluster_controller::StopCluster {
        super::builder::cluster_controller::StopCluster::new(self.inner.clone())
    }

    /// Starts a cluster in a project.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn start_cluster(&self) -> super::builder::cluster_controller::StartCluster {
        super::builder::cluster_controller::StartCluster::new(self.inner.clone())
    }

    /// Deletes a cluster in a project. The returned
    /// [Operation.metadata][google.longrunning.Operation.metadata] will be
    /// [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
    ///
    /// [google.longrunning.Operation.metadata]: longrunning::model::Operation::metadata
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_cluster(&self) -> super::builder::cluster_controller::DeleteCluster {
        super::builder::cluster_controller::DeleteCluster::new(self.inner.clone())
    }

    /// Gets the resource representation for a cluster in a project.
    pub fn get_cluster(&self) -> super::builder::cluster_controller::GetCluster {
        super::builder::cluster_controller::GetCluster::new(self.inner.clone())
    }

    /// Lists all regions/{region}/clusters in a project alphabetically.
    pub fn list_clusters(&self) -> super::builder::cluster_controller::ListClusters {
        super::builder::cluster_controller::ListClusters::new(self.inner.clone())
    }

    /// Gets cluster diagnostic information. The returned
    /// [Operation.metadata][google.longrunning.Operation.metadata] will be
    /// [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).
    /// After the operation completes,
    /// [Operation.response][google.longrunning.Operation.response]
    /// contains
    /// [DiagnoseClusterResults](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#diagnoseclusterresults).
    ///
    /// [google.longrunning.Operation.metadata]: longrunning::model::Operation::metadata
    /// [google.longrunning.Operation.response]: longrunning::model::Operation::result
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn diagnose_cluster(&self) -> super::builder::cluster_controller::DiagnoseCluster {
        super::builder::cluster_controller::DiagnoseCluster::new(self.inner.clone())
    }

    /// Sets the access control policy on the specified resource. Replaces
    /// any existing policy.
    ///
    /// Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
    /// errors.
    pub fn set_iam_policy(&self) -> super::builder::cluster_controller::SetIamPolicy {
        super::builder::cluster_controller::SetIamPolicy::new(self.inner.clone())
    }

    /// Gets the access control policy for a resource. Returns an empty policy
    /// if the resource exists and does not have a policy set.
    pub fn get_iam_policy(&self) -> super::builder::cluster_controller::GetIamPolicy {
        super::builder::cluster_controller::GetIamPolicy::new(self.inner.clone())
    }

    /// Returns permissions that a caller has on the specified resource. If the
    /// resource does not exist, this will return an empty set of
    /// permissions, not a `NOT_FOUND` error.
    ///
    /// Note: This operation is designed to be used for building
    /// permission-aware UIs and command-line tools, not for authorization
    /// checking. This operation may "fail open" without warning.
    pub fn test_iam_permissions(&self) -> super::builder::cluster_controller::TestIamPermissions {
        super::builder::cluster_controller::TestIamPermissions::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::cluster_controller::ListOperations {
        super::builder::cluster_controller::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::cluster_controller::GetOperation {
        super::builder::cluster_controller::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::cluster_controller::DeleteOperation {
        super::builder::cluster_controller::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::cluster_controller::CancelOperation {
        super::builder::cluster_controller::CancelOperation::new(self.inner.clone())
    }
}

/// Implements a client for the Cloud Dataproc API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_dataproc_v1::client::JobController;
/// let client = JobController::builder().build().await?;
/// // use `client` to make requests to the Cloud Dataproc API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// The JobController provides methods to manage jobs.
///
/// # Configuration
///
/// To configure `JobController` use the `with_*` methods in the type returned
/// by [builder()][JobController::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://dataproc.googleapis.com`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::job_controller::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::job_controller::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `JobController` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `JobController` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct JobController {
    inner: std::sync::Arc<dyn super::stub::dynamic::JobController>,
}

impl JobController {
    /// Returns a builder for [JobController].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_dataproc_v1::client::JobController;
    /// let client = JobController::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::job_controller::ClientBuilder {
        gax::client_builder::internal::new_builder(super::builder::job_controller::client::Factory)
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::JobController + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::JobController>> {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::JobController> {
        super::transport::JobController::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::JobController> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::JobController::new)
    }

    /// Submits a job to a cluster.
    pub fn submit_job(&self) -> super::builder::job_controller::SubmitJob {
        super::builder::job_controller::SubmitJob::new(self.inner.clone())
    }

    /// Submits job to a cluster.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn submit_job_as_operation(&self) -> super::builder::job_controller::SubmitJobAsOperation {
        super::builder::job_controller::SubmitJobAsOperation::new(self.inner.clone())
    }

    /// Gets the resource representation for a job in a project.
    pub fn get_job(&self) -> super::builder::job_controller::GetJob {
        super::builder::job_controller::GetJob::new(self.inner.clone())
    }

    /// Lists regions/{region}/jobs in a project.
    pub fn list_jobs(&self) -> super::builder::job_controller::ListJobs {
        super::builder::job_controller::ListJobs::new(self.inner.clone())
    }

    /// Updates a job in a project.
    pub fn update_job(&self) -> super::builder::job_controller::UpdateJob {
        super::builder::job_controller::UpdateJob::new(self.inner.clone())
    }

    /// Starts a job cancellation request. To access the job resource
    /// after cancellation, call
    /// [regions/{region}/jobs.list](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/list)
    /// or
    /// [regions/{region}/jobs.get](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/get).
    pub fn cancel_job(&self) -> super::builder::job_controller::CancelJob {
        super::builder::job_controller::CancelJob::new(self.inner.clone())
    }

    /// Deletes the job from the project. If the job is active, the delete fails,
    /// and the response returns `FAILED_PRECONDITION`.
    pub fn delete_job(&self) -> super::builder::job_controller::DeleteJob {
        super::builder::job_controller::DeleteJob::new(self.inner.clone())
    }

    /// Sets the access control policy on the specified resource. Replaces
    /// any existing policy.
    ///
    /// Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
    /// errors.
    pub fn set_iam_policy(&self) -> super::builder::job_controller::SetIamPolicy {
        super::builder::job_controller::SetIamPolicy::new(self.inner.clone())
    }

    /// Gets the access control policy for a resource. Returns an empty policy
    /// if the resource exists and does not have a policy set.
    pub fn get_iam_policy(&self) -> super::builder::job_controller::GetIamPolicy {
        super::builder::job_controller::GetIamPolicy::new(self.inner.clone())
    }

    /// Returns permissions that a caller has on the specified resource. If the
    /// resource does not exist, this will return an empty set of
    /// permissions, not a `NOT_FOUND` error.
    ///
    /// Note: This operation is designed to be used for building
    /// permission-aware UIs and command-line tools, not for authorization
    /// checking. This operation may "fail open" without warning.
    pub fn test_iam_permissions(&self) -> super::builder::job_controller::TestIamPermissions {
        super::builder::job_controller::TestIamPermissions::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::job_controller::ListOperations {
        super::builder::job_controller::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::job_controller::GetOperation {
        super::builder::job_controller::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::job_controller::DeleteOperation {
        super::builder::job_controller::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::job_controller::CancelOperation {
        super::builder::job_controller::CancelOperation::new(self.inner.clone())
    }
}

/// Implements a client for the Cloud Dataproc API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_dataproc_v1::client::NodeGroupController;
/// let client = NodeGroupController::builder().build().await?;
/// // use `client` to make requests to the Cloud Dataproc API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// The `NodeGroupControllerService` provides methods to manage node groups
/// of Compute Engine managed instances.
///
/// # Configuration
///
/// To configure `NodeGroupController` use the `with_*` methods in the type returned
/// by [builder()][NodeGroupController::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://dataproc.googleapis.com`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::node_group_controller::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::node_group_controller::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `NodeGroupController` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `NodeGroupController` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct NodeGroupController {
    inner: std::sync::Arc<dyn super::stub::dynamic::NodeGroupController>,
}

impl NodeGroupController {
    /// Returns a builder for [NodeGroupController].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_dataproc_v1::client::NodeGroupController;
    /// let client = NodeGroupController::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::node_group_controller::ClientBuilder {
        gax::client_builder::internal::new_builder(
            super::builder::node_group_controller::client::Factory,
        )
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::NodeGroupController + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::NodeGroupController>>
    {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::NodeGroupController> {
        super::transport::NodeGroupController::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::NodeGroupController> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::NodeGroupController::new)
    }

    /// Creates a node group in a cluster. The returned
    /// [Operation.metadata][google.longrunning.Operation.metadata] is
    /// [NodeGroupOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata).
    ///
    /// [google.longrunning.Operation.metadata]: longrunning::model::Operation::metadata
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_node_group(&self) -> super::builder::node_group_controller::CreateNodeGroup {
        super::builder::node_group_controller::CreateNodeGroup::new(self.inner.clone())
    }

    /// Resizes a node group in a cluster. The returned
    /// [Operation.metadata][google.longrunning.Operation.metadata] is
    /// [NodeGroupOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata).
    ///
    /// [google.longrunning.Operation.metadata]: longrunning::model::Operation::metadata
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn resize_node_group(&self) -> super::builder::node_group_controller::ResizeNodeGroup {
        super::builder::node_group_controller::ResizeNodeGroup::new(self.inner.clone())
    }

    /// Gets the resource representation for a node group in a
    /// cluster.
    pub fn get_node_group(&self) -> super::builder::node_group_controller::GetNodeGroup {
        super::builder::node_group_controller::GetNodeGroup::new(self.inner.clone())
    }

    /// Sets the access control policy on the specified resource. Replaces
    /// any existing policy.
    ///
    /// Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
    /// errors.
    pub fn set_iam_policy(&self) -> super::builder::node_group_controller::SetIamPolicy {
        super::builder::node_group_controller::SetIamPolicy::new(self.inner.clone())
    }

    /// Gets the access control policy for a resource. Returns an empty policy
    /// if the resource exists and does not have a policy set.
    pub fn get_iam_policy(&self) -> super::builder::node_group_controller::GetIamPolicy {
        super::builder::node_group_controller::GetIamPolicy::new(self.inner.clone())
    }

    /// Returns permissions that a caller has on the specified resource. If the
    /// resource does not exist, this will return an empty set of
    /// permissions, not a `NOT_FOUND` error.
    ///
    /// Note: This operation is designed to be used for building
    /// permission-aware UIs and command-line tools, not for authorization
    /// checking. This operation may "fail open" without warning.
    pub fn test_iam_permissions(
        &self,
    ) -> super::builder::node_group_controller::TestIamPermissions {
        super::builder::node_group_controller::TestIamPermissions::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::node_group_controller::ListOperations {
        super::builder::node_group_controller::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::node_group_controller::GetOperation {
        super::builder::node_group_controller::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::node_group_controller::DeleteOperation {
        super::builder::node_group_controller::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::node_group_controller::CancelOperation {
        super::builder::node_group_controller::CancelOperation::new(self.inner.clone())
    }
}

/// Implements a client for the Cloud Dataproc API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_dataproc_v1::client::SessionTemplateController;
/// let client = SessionTemplateController::builder().build().await?;
/// // use `client` to make requests to the Cloud Dataproc API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// The SessionTemplateController provides methods to manage session templates.
///
/// # Configuration
///
/// To configure `SessionTemplateController` use the `with_*` methods in the type returned
/// by [builder()][SessionTemplateController::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://dataproc.googleapis.com`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::session_template_controller::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::session_template_controller::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `SessionTemplateController` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `SessionTemplateController` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct SessionTemplateController {
    inner: std::sync::Arc<dyn super::stub::dynamic::SessionTemplateController>,
}

impl SessionTemplateController {
    /// Returns a builder for [SessionTemplateController].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_dataproc_v1::client::SessionTemplateController;
    /// let client = SessionTemplateController::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::session_template_controller::ClientBuilder {
        gax::client_builder::internal::new_builder(
            super::builder::session_template_controller::client::Factory,
        )
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::SessionTemplateController + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<
        std::sync::Arc<dyn super::stub::dynamic::SessionTemplateController>,
    > {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::SessionTemplateController> {
        super::transport::SessionTemplateController::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::SessionTemplateController> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::SessionTemplateController::new)
    }

    /// Create a session template synchronously.
    pub fn create_session_template(
        &self,
    ) -> super::builder::session_template_controller::CreateSessionTemplate {
        super::builder::session_template_controller::CreateSessionTemplate::new(self.inner.clone())
    }

    /// Updates the session template synchronously.
    pub fn update_session_template(
        &self,
    ) -> super::builder::session_template_controller::UpdateSessionTemplate {
        super::builder::session_template_controller::UpdateSessionTemplate::new(self.inner.clone())
    }

    /// Gets the resource representation for a session template.
    pub fn get_session_template(
        &self,
    ) -> super::builder::session_template_controller::GetSessionTemplate {
        super::builder::session_template_controller::GetSessionTemplate::new(self.inner.clone())
    }

    /// Lists session templates.
    pub fn list_session_templates(
        &self,
    ) -> super::builder::session_template_controller::ListSessionTemplates {
        super::builder::session_template_controller::ListSessionTemplates::new(self.inner.clone())
    }

    /// Deletes a session template.
    pub fn delete_session_template(
        &self,
    ) -> super::builder::session_template_controller::DeleteSessionTemplate {
        super::builder::session_template_controller::DeleteSessionTemplate::new(self.inner.clone())
    }

    /// Sets the access control policy on the specified resource. Replaces
    /// any existing policy.
    ///
    /// Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
    /// errors.
    pub fn set_iam_policy(&self) -> super::builder::session_template_controller::SetIamPolicy {
        super::builder::session_template_controller::SetIamPolicy::new(self.inner.clone())
    }

    /// Gets the access control policy for a resource. Returns an empty policy
    /// if the resource exists and does not have a policy set.
    pub fn get_iam_policy(&self) -> super::builder::session_template_controller::GetIamPolicy {
        super::builder::session_template_controller::GetIamPolicy::new(self.inner.clone())
    }

    /// Returns permissions that a caller has on the specified resource. If the
    /// resource does not exist, this will return an empty set of
    /// permissions, not a `NOT_FOUND` error.
    ///
    /// Note: This operation is designed to be used for building
    /// permission-aware UIs and command-line tools, not for authorization
    /// checking. This operation may "fail open" without warning.
    pub fn test_iam_permissions(
        &self,
    ) -> super::builder::session_template_controller::TestIamPermissions {
        super::builder::session_template_controller::TestIamPermissions::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::session_template_controller::ListOperations {
        super::builder::session_template_controller::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::session_template_controller::GetOperation {
        super::builder::session_template_controller::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::session_template_controller::DeleteOperation {
        super::builder::session_template_controller::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::session_template_controller::CancelOperation {
        super::builder::session_template_controller::CancelOperation::new(self.inner.clone())
    }
}

/// Implements a client for the Cloud Dataproc API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_dataproc_v1::client::SessionController;
/// let client = SessionController::builder().build().await?;
/// // use `client` to make requests to the Cloud Dataproc API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// The `SessionController` provides methods to manage interactive sessions.
///
/// # Configuration
///
/// To configure `SessionController` use the `with_*` methods in the type returned
/// by [builder()][SessionController::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://dataproc.googleapis.com`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::session_controller::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::session_controller::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `SessionController` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `SessionController` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct SessionController {
    inner: std::sync::Arc<dyn super::stub::dynamic::SessionController>,
}

impl SessionController {
    /// Returns a builder for [SessionController].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_dataproc_v1::client::SessionController;
    /// let client = SessionController::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::session_controller::ClientBuilder {
        gax::client_builder::internal::new_builder(
            super::builder::session_controller::client::Factory,
        )
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::SessionController + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::SessionController>>
    {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::SessionController> {
        super::transport::SessionController::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::SessionController> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::SessionController::new)
    }

    /// Create an interactive session asynchronously.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_session(&self) -> super::builder::session_controller::CreateSession {
        super::builder::session_controller::CreateSession::new(self.inner.clone())
    }

    /// Gets the resource representation for an interactive session.
    pub fn get_session(&self) -> super::builder::session_controller::GetSession {
        super::builder::session_controller::GetSession::new(self.inner.clone())
    }

    /// Lists interactive sessions.
    pub fn list_sessions(&self) -> super::builder::session_controller::ListSessions {
        super::builder::session_controller::ListSessions::new(self.inner.clone())
    }

    /// Terminates the interactive session.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn terminate_session(&self) -> super::builder::session_controller::TerminateSession {
        super::builder::session_controller::TerminateSession::new(self.inner.clone())
    }

    /// Deletes the interactive session resource. If the session is not in terminal
    /// state, it is terminated, and then deleted.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_session(&self) -> super::builder::session_controller::DeleteSession {
        super::builder::session_controller::DeleteSession::new(self.inner.clone())
    }

    /// Sets the access control policy on the specified resource. Replaces
    /// any existing policy.
    ///
    /// Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
    /// errors.
    pub fn set_iam_policy(&self) -> super::builder::session_controller::SetIamPolicy {
        super::builder::session_controller::SetIamPolicy::new(self.inner.clone())
    }

    /// Gets the access control policy for a resource. Returns an empty policy
    /// if the resource exists and does not have a policy set.
    pub fn get_iam_policy(&self) -> super::builder::session_controller::GetIamPolicy {
        super::builder::session_controller::GetIamPolicy::new(self.inner.clone())
    }

    /// Returns permissions that a caller has on the specified resource. If the
    /// resource does not exist, this will return an empty set of
    /// permissions, not a `NOT_FOUND` error.
    ///
    /// Note: This operation is designed to be used for building
    /// permission-aware UIs and command-line tools, not for authorization
    /// checking. This operation may "fail open" without warning.
    pub fn test_iam_permissions(&self) -> super::builder::session_controller::TestIamPermissions {
        super::builder::session_controller::TestIamPermissions::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::session_controller::ListOperations {
        super::builder::session_controller::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::session_controller::GetOperation {
        super::builder::session_controller::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::session_controller::DeleteOperation {
        super::builder::session_controller::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::session_controller::CancelOperation {
        super::builder::session_controller::CancelOperation::new(self.inner.clone())
    }
}

/// Implements a client for the Cloud Dataproc API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_dataproc_v1::client::WorkflowTemplateService;
/// let client = WorkflowTemplateService::builder().build().await?;
/// // use `client` to make requests to the Cloud Dataproc API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// The API interface for managing Workflow Templates in the
/// Dataproc API.
///
/// # Configuration
///
/// To configure `WorkflowTemplateService` use the `with_*` methods in the type returned
/// by [builder()][WorkflowTemplateService::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://dataproc.googleapis.com`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::workflow_template_service::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::workflow_template_service::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `WorkflowTemplateService` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `WorkflowTemplateService` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct WorkflowTemplateService {
    inner: std::sync::Arc<dyn super::stub::dynamic::WorkflowTemplateService>,
}

impl WorkflowTemplateService {
    /// Returns a builder for [WorkflowTemplateService].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_dataproc_v1::client::WorkflowTemplateService;
    /// let client = WorkflowTemplateService::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::workflow_template_service::ClientBuilder {
        gax::client_builder::internal::new_builder(
            super::builder::workflow_template_service::client::Factory,
        )
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::WorkflowTemplateService + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<
        std::sync::Arc<dyn super::stub::dynamic::WorkflowTemplateService>,
    > {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::WorkflowTemplateService> {
        super::transport::WorkflowTemplateService::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::WorkflowTemplateService> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::WorkflowTemplateService::new)
    }

    /// Creates new workflow template.
    pub fn create_workflow_template(
        &self,
    ) -> super::builder::workflow_template_service::CreateWorkflowTemplate {
        super::builder::workflow_template_service::CreateWorkflowTemplate::new(self.inner.clone())
    }

    /// Retrieves the latest workflow template.
    ///
    /// Can retrieve previously instantiated template by specifying optional
    /// version parameter.
    pub fn get_workflow_template(
        &self,
    ) -> super::builder::workflow_template_service::GetWorkflowTemplate {
        super::builder::workflow_template_service::GetWorkflowTemplate::new(self.inner.clone())
    }

    /// Instantiates a template and begins execution.
    ///
    /// The returned Operation can be used to track execution of
    /// workflow by polling
    /// [operations.get][google.longrunning.Operations.GetOperation].
    /// The Operation will complete when entire workflow is finished.
    ///
    /// The running workflow can be aborted via
    /// [operations.cancel][google.longrunning.Operations.CancelOperation].
    /// This will cause any inflight jobs to be cancelled and workflow-owned
    /// clusters to be deleted.
    ///
    /// The [Operation.metadata][google.longrunning.Operation.metadata] will be
    /// [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata).
    /// Also see [Using
    /// WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).
    ///
    /// On successful completion,
    /// [Operation.response][google.longrunning.Operation.response] will be
    /// [Empty][google.protobuf.Empty].
    ///
    /// [google.longrunning.Operation.metadata]: longrunning::model::Operation::metadata
    /// [google.longrunning.Operation.response]: longrunning::model::Operation::result
    /// [google.protobuf.Empty]: wkt::Empty
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn instantiate_workflow_template(
        &self,
    ) -> super::builder::workflow_template_service::InstantiateWorkflowTemplate {
        super::builder::workflow_template_service::InstantiateWorkflowTemplate::new(
            self.inner.clone(),
        )
    }

    /// Instantiates a template and begins execution.
    ///
    /// This method is equivalent to executing the sequence
    /// [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate],
    /// [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate],
    /// [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate].
    ///
    /// The returned Operation can be used to track execution of
    /// workflow by polling
    /// [operations.get][google.longrunning.Operations.GetOperation].
    /// The Operation will complete when entire workflow is finished.
    ///
    /// The running workflow can be aborted via
    /// [operations.cancel][google.longrunning.Operations.CancelOperation].
    /// This will cause any inflight jobs to be cancelled and workflow-owned
    /// clusters to be deleted.
    ///
    /// The [Operation.metadata][google.longrunning.Operation.metadata] will be
    /// [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata).
    /// Also see [Using
    /// WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).
    ///
    /// On successful completion,
    /// [Operation.response][google.longrunning.Operation.response] will be
    /// [Empty][google.protobuf.Empty].
    ///
    /// [google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate]: crate::client::WorkflowTemplateService::create_workflow_template
    /// [google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate]: crate::client::WorkflowTemplateService::delete_workflow_template
    /// [google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate]: crate::client::WorkflowTemplateService::instantiate_workflow_template
    /// [google.longrunning.Operation.metadata]: longrunning::model::Operation::metadata
    /// [google.longrunning.Operation.response]: longrunning::model::Operation::result
    /// [google.protobuf.Empty]: wkt::Empty
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn instantiate_inline_workflow_template(
        &self,
    ) -> super::builder::workflow_template_service::InstantiateInlineWorkflowTemplate {
        super::builder::workflow_template_service::InstantiateInlineWorkflowTemplate::new(
            self.inner.clone(),
        )
    }

    /// Updates (replaces) workflow template. The updated template
    /// must contain version that matches the current server version.
    pub fn update_workflow_template(
        &self,
    ) -> super::builder::workflow_template_service::UpdateWorkflowTemplate {
        super::builder::workflow_template_service::UpdateWorkflowTemplate::new(self.inner.clone())
    }

    /// Lists workflows that match the specified filter in the request.
    pub fn list_workflow_templates(
        &self,
    ) -> super::builder::workflow_template_service::ListWorkflowTemplates {
        super::builder::workflow_template_service::ListWorkflowTemplates::new(self.inner.clone())
    }

    /// Deletes a workflow template. It does not cancel in-progress workflows.
    pub fn delete_workflow_template(
        &self,
    ) -> super::builder::workflow_template_service::DeleteWorkflowTemplate {
        super::builder::workflow_template_service::DeleteWorkflowTemplate::new(self.inner.clone())
    }

    /// Sets the access control policy on the specified resource. Replaces
    /// any existing policy.
    ///
    /// Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
    /// errors.
    pub fn set_iam_policy(&self) -> super::builder::workflow_template_service::SetIamPolicy {
        super::builder::workflow_template_service::SetIamPolicy::new(self.inner.clone())
    }

    /// Gets the access control policy for a resource. Returns an empty policy
    /// if the resource exists and does not have a policy set.
    pub fn get_iam_policy(&self) -> super::builder::workflow_template_service::GetIamPolicy {
        super::builder::workflow_template_service::GetIamPolicy::new(self.inner.clone())
    }

    /// Returns permissions that a caller has on the specified resource. If the
    /// resource does not exist, this will return an empty set of
    /// permissions, not a `NOT_FOUND` error.
    ///
    /// Note: This operation is designed to be used for building
    /// permission-aware UIs and command-line tools, not for authorization
    /// checking. This operation may "fail open" without warning.
    pub fn test_iam_permissions(
        &self,
    ) -> super::builder::workflow_template_service::TestIamPermissions {
        super::builder::workflow_template_service::TestIamPermissions::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::workflow_template_service::ListOperations {
        super::builder::workflow_template_service::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::workflow_template_service::GetOperation {
        super::builder::workflow_template_service::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::workflow_template_service::DeleteOperation {
        super::builder::workflow_template_service::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::workflow_template_service::CancelOperation {
        super::builder::workflow_template_service::CancelOperation::new(self.inner.clone())
    }
}
